package com.wz.project.cxtj.viewstockdetail.service.impl;

import com.wz.common.utils.text.Convert;
import com.wz.project.cxtj.viewstockdetail.domain.ViewStockDetailed;
import com.wz.project.cxtj.viewstockdetail.mapper.ViewStockDetailedMapper;
import com.wz.project.cxtj.viewstockdetail.service.IViewStockDetailedService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 库存明细Service业务层处理
 * 
 * @author wz
 * @date 2022-05-18
 */
@Service
public class ViewStockDetailedServiceImpl implements IViewStockDetailedService
{
    @Autowired
    private ViewStockDetailedMapper viewStockDetailedMapper;

    /**
     * 查询库存明细
     * 
     * @param stockId 库存明细ID
     * @return 库存明细
     */
    @Override
    public ViewStockDetailed selectViewStockDetailedById(String stockId)
    {
        return viewStockDetailedMapper.selectViewStockDetailedById(stockId);
    }

    /**
     * 查询库存明细列表
     * 
     * @param viewStockDetailed 库存明细
     * @return 库存明细
     */
    @Override
    public List<ViewStockDetailed> selectViewStockDetailedList(ViewStockDetailed viewStockDetailed)
    {
        return viewStockDetailedMapper.selectViewStockDetailedList(viewStockDetailed);
    }

    /**
     * 新增库存明细
     * 
     * @param viewStockDetailed 库存明细
     * @return 结果
     */
    @Override
    public int insertViewStockDetailed(ViewStockDetailed viewStockDetailed)
    {
        return viewStockDetailedMapper.insertViewStockDetailed(viewStockDetailed);
    }

    /**
     * 修改库存明细
     * 
     * @param viewStockDetailed 库存明细
     * @return 结果
     */
    @Override
    public int updateViewStockDetailed(ViewStockDetailed viewStockDetailed)
    {
        return viewStockDetailedMapper.updateViewStockDetailed(viewStockDetailed);
    }

    /**
     * 删除库存明细对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteViewStockDetailedByIds(String ids)
    {
        return viewStockDetailedMapper.deleteViewStockDetailedByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除库存明细信息
     * 
     * @param stockId 库存明细ID
     * @return 结果
     */
    @Override
    public int deleteViewStockDetailedById(String stockId)
    {
        return viewStockDetailedMapper.deleteViewStockDetailedById(stockId);
    }
}
